package com.xyz.code.ui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.border.TitledBorder;
import java.awt.Window.Type;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JTextPane;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.JPasswordField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JCheckBox;

public class JFrameTest extends JFrame {
    
    private JPanel contentPane;
    private JTextField textField;
    private JTextField textField_1;
    private JPasswordField passwordField;
    private JTextField textField_2;
    private JTextField textField_3;
    private JPasswordField passwordField_1;
    private JTextField textField_4;
    private JTextField textField_5;
    
    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    JFrameTest frame = new JFrameTest();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }
    
    /**
     * Create the frame.
     */
    public JFrameTest() {
        setTitle("代码生成器");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 769, 527);
        contentPane = new JPanel();
        contentPane.setToolTipText("test");
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(null);
        
        JPanel panel = new JPanel();
        panel.setBorder(new TitledBorder(null, "\u6570\u636E\u5E93\u8BBE\u7F6E", TitledBorder.LEADING, TitledBorder.TOP, null, null));
        panel.setBounds(34, 10, 709, 138);
        contentPane.add(panel);
        panel.setLayout(null);
        
        JLabel lblNewLabel = new JLabel("地址：");
        lblNewLabel.setBounds(20, 25, 54, 15);
        lblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);
        panel.add(lblNewLabel);
        
        textField = new JTextField();
        textField.setToolTipText("test");
        textField.setBounds(58, 22, 175, 21);
        panel.add(textField);
        textField.setColumns(10);
        
        JLabel label = new JLabel("用户名：");
        label.setHorizontalAlignment(SwingConstants.LEFT);
        label.setBounds(272, 25, 54, 15);
        panel.add(label);
        
        textField_1 = new JTextField();
        textField_1.setColumns(10);
        textField_1.setBounds(317, 22, 118, 21);
        panel.add(textField_1);
        
        JLabel label_1 = new JLabel("密码：");
        label_1.setHorizontalAlignment(SwingConstants.LEFT);
        label_1.setBounds(445, 28, 54, 15);
        panel.add(label_1);
        
        JButton btnNewIanbutton = new JButton("连接");
        btnNewIanbutton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                System.out.println("1111111111111111111");
            }
        });
        btnNewIanbutton.setBounds(628, 21, 71, 23);
        panel.add(btnNewIanbutton);
        
        JTextArea textArea = new JTextArea();
        textArea.setBounds(20, 50, 590, 78);
        panel.add(textArea);
        
        passwordField = new JPasswordField();
        passwordField.setBounds(488, 22, 122, 21);
        panel.add(passwordField);
        
        JPanel panel_1 = new JPanel();
        panel_1.setLayout(null);
        panel_1.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u53C2\u6570\u8BBE\u7F6E", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
        panel_1.setBounds(34, 146, 709, 276);
        contentPane.add(panel_1);
        
        JLabel label_2 = new JLabel("包名：");
        label_2.setHorizontalAlignment(SwingConstants.LEFT);
        label_2.setBounds(34, 55, 36, 15);
        panel_1.add(label_2);
        
        textField_2 = new JTextField();
        textField_2.setToolTipText("test");
        textField_2.setColumns(10);
        textField_2.setBounds(86, 49, 218, 21);
        panel_1.add(textField_2);
        
        JLabel label_3 = new JLabel("模块名：");
        label_3.setHorizontalAlignment(SwingConstants.LEFT);
        label_3.setBounds(327, 49, 48, 15);
        panel_1.add(label_3);
        
        textField_3 = new JTextField();
        textField_3.setColumns(10);
        textField_3.setBounds(381, 49, 224, 21);
        panel_1.add(textField_3);
        
        JLabel label_4 = new JLabel("文件目录：");
        label_4.setHorizontalAlignment(SwingConstants.LEFT);
        label_4.setBounds(11, 27, 68, 15);
        panel_1.add(label_4);
        
        passwordField_1 = new JPasswordField();
        passwordField_1.setBounds(86, 21, 519, 21);
        panel_1.add(passwordField_1);
        
        JCheckBox chckbxNewCheckBox = new JCheckBox("entity类");
        chckbxNewCheckBox.setBounds(11, 76, 73, 23);
        panel_1.add(chckbxNewCheckBox);
        
        textField_4 = new JTextField();
        textField_4.setToolTipText("test");
        textField_4.setColumns(10);
        textField_4.setBounds(91, 78, 207, 21);
        panel_1.add(textField_4);
        
        JCheckBox checkBox = new JCheckBox("dto类");
        checkBox.setBounds(308, 80, 73, 23);
        panel_1.add(checkBox);
        
        textField_5 = new JTextField();
        textField_5.setToolTipText("test");
        textField_5.setColumns(10);
        textField_5.setBounds(388, 82, 207, 21);
        panel_1.add(textField_5);
        
        JButton button_1 = new JButton("选择");
        button_1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
            }
        });
        button_1.setBounds(627, 20, 71, 23);
        panel_1.add(button_1);
        
        JButton button = new JButton("生成");
        button.setBackground(new Color(153, 204, 102));
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
            }
        });
        button.setBounds(337, 456, 71, 23);
        contentPane.add(button);
    }
}
